package grape.attend.service.user.api;

import grape.attend.service.user.po.UserVacationSumRecord;
import grape.common.service.common.IBaseService;

/**
 * <p>
 * 用户假期余额记录日志表 服务类
 * </p>
 *
 * @author yangwei
 * @since 2020-05-18
 */
public interface IUserVacationSumRecordService extends IBaseService<UserVacationSumRecord> {

    /**
     *
     * @param userId
     * @param typeDictId
     * @param userVacationId
     * @param dataId
     * @return
     */
    default UserVacationSumRecord getOne(String userId,String typeDictId,String userVacationId,String dataId){

        assertParamNotEmpty(userId,"userId 不能为空");
        assertParamNotEmpty(typeDictId,"userId 不能为空");
        assertParamNotEmpty(userVacationId,"userId 不能为空");
        assertParamNotEmpty(dataId,"userId 不能为空");

        UserVacationSumRecord userVacationSumRecord = new UserVacationSumRecord();
        userVacationSumRecord.setUserId(userId);
        userVacationSumRecord.setTypeDictId(typeDictId);
        userVacationSumRecord.setUserVacationId(userVacationId);
        userVacationSumRecord.setDataId(dataId);
        return getOne(userVacationSumRecord);

    }

}
